package com.lipl.base.javase.designpattern.factory.simplefactroy;

/**
 * @Auther: 15541
 * @Date: 2020/10/24 10:45
 * @Description:
 */
public class TestSimpleFactory {

    public static void main(String[] args) {
        Product productA = Factory.createProduct("A");
        System.out.println("productA name="+productA.getName()+",getPrice:"+productA.price());

        Product productB = Factory.createProduct("B");
        System.out.println("productB name="+productB.getName()+",getPrice:"+productB.price());

        Product productC = Factory.createProduct("C");
        System.out.println("productC name="+productC.getName()+",getPrice:"+productC.price());
    }
}

